<!DOCTYPE html>
<html>
<head>
    <title>家教精灵官网_我的</title>
    <meta  charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.2/style/weui.min.css">
    <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.0/css/jquery-weui.min.css">
    <link rel="stylesheet" href="https://jqweui.cn/dist/demos/css/demos.css ">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_548170_0lixohrwtdkg9zfr.css">
    <script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
    <link href="__TMPL__/public/assets/css/mui.min.css" rel="stylesheet"/>
    <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_547740_9gs87aifpyzaor.css"/>
    <style>
        .teacher-list.teacher_head_header header {
            position: relative;
        }
         .new_m_header{
            z-index: 100;
            position: relative;
        }
    </style>
</head>

<body ontouchstart style="background-color: #eeefef" >
<div class="page__bd"  style="margin-top:0px">
    <div class="weui-panel weui-panel_access" style="background-color: #eeeeee;">
        <div class="weui-panel__bd">
            <a class="weui-media-box weui-media-box_appmsg" style="background-color: white">
                <div class="weui-media-box__hd">
                    <img class="weui-media-box__thumb" id="tximg" style="border-radius: 50px;"  src="{$photo}">
                    <input type="file" name="tx" id="picup" onchange="displayPic()" value="sdkfls" style=" opacity: 0;position: absolute;z-index: 10;padding-left: -31px;margin-top: -50px;margin-left: -50px;padding-top: 20px;">
                </div>
                <script>
                    function displayPic(){
                        /* var fileName="";
                         fileName = document.getElementById('picup').value;
                         $("#tximg").attr("src",fileName);
                         document.getElementById('tximg').attr('src',fileName);*/
                         console.log(1);
                        var formData = new FormData(document.getElementById("form"));//表单id
                        console.log(document.getElementById('picup').value);
                        $.ajax({
                            //路径应符合规范
                            url: '{:url("portal/teacher/txset")}' ,
                            type: 'POST',
                            data: formData,
                            async: false,
                            cache: false,
                            contentType: false,
                            processData: false,
                            success: function (result) {
                                console.log(result);
                                if(result){
                                    //其返回值为带引号的图片路径 例：\/upload/"jo.jpg"  \/upload/jo.jpg"  \/upload/ jo.jpg \upload/ jo.jpg
                                    $("#tximg").attr("src",result.replace("\"", '').replace("\"", '').replace('\\', ''));

                                }

                            }
                        });
                    }
                </script>
                <div class="weui-media-box__bd" style="margin-left: 5%;margin-top: -5px">
                    <h4 class="weui-media-box__title">{$nickname}</h4>
                </div>
            </a>
        </div>
    </div>

    <div class="weui-panel"  style="margin-top: 8px">
        <div class="weui-panel__bd" style="margin-top: 5px">
            <div class="weui-media-box weui-media-box_small-appmsg">
                <div class="weui-cells">
                    <a class="weui-cell weui-cell_access" href="{:url('my/yuyue')}">
                        <div class="weui-cell__hd"  style="margin: 0px 8px ">
                            <span   style="color: #555555;font-size: 17px;" class="icon lai icon-yuyueguanli"> </span>
                        </div>
                        <div class="weui-cell__bd weui-cell_primary">
                            <p style="margin: 0px 4px ">预约</p>
                        </div>
                        <span class="weui-cell__ft"></span>
                    </a>
                    <a class="weui-cell weui-cell_access" href="{:url('my/shoucang')}">
                        <div class="weui-cell__hd"  style="margin: 0px 6px ">
                            <span style="color: #ababab ;font-size: 20px;" class="icon lai icon-shoucang"></span>
                        </div>
                        <div class="weui-cell__bd weui-cell_primary">
                            <p style="margin: 0px 4px ">收藏</p>
                        </div>
                        <span class="weui-cell__ft"></span>
                    </a>
                    <a class="weui-cell weui-cell_access" href="{:url('my/comment')}">
                        <div class="weui-cell__hd"  style="margin: 0px 9px  ">
                            <span style="color: #9a9a9a; font-size: 15px;" class="icon lai icon-pingjia"></span>
                        </div>
                        <div class="weui-cell__bd weui-cell_primary">
                            <p style="margin: 0px 4px ">评价</p>
                        </div>
                        <span class="weui-cell__ft"></span>
                    </a>
                </div>
            </div>
        </div>
    </div>

</div>
<nav class="mui-bar mui-bar-tab" style="box-shadow: 0 0 1px #ffffff;">
    <a class="mui-tab-item " id="sy"  style="text-decoration: none" >
        <span class="mui-icon mui-icon-home"></span>
        <span class="mui-tab-label">首页</span>
    </a>
    <a class="mui-tab-item  "  id="hot"  style="text-decoration: none" >
			        <span class="mui-icon bb icon-remen" style="font-size: 30px;margin-left: -10px;margin-bottom: 13px;">
			        </span>
        <span class="mui-tab-label" style="margin-top: -8px">热门</span>
    </a>
    <a class="mui-tab-item mui-active" id="my"  style="text-decoration: none" >
        <span class="mui-icon bb icon-wode"></span>
        <span class="mui-tab-label">我的</span>
    </a>
</nav>
<script src="__TMPL__/public/assets/js/mui.min.js"></script>
<script>
    mui(".mui-bar").on('tap','#sy',function(){
        mui.openWindow({
            id:'sy.html',
            url:'../index/index'
        })
        $(".nav").hide();
    });
    mui(".mui-bar").on('tap','#hot',function(){
        mui.openWindow({
            id:'hot.html',
            url:'../hot/hot'
        })
        $(".nav").hide();
    });
</script>
</body>
<!--<script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>-->
<!--<script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/jquery-weui.min.js"></script>-->
</html>
